﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

using Pg.BioMedics.SDR.Entities;

namespace Pg.BioMedics.SDR.Caching
{
    /// <summary>
    /// Provides strongly typed Cache for Annotation entities
    /// </summary>
    public class AnnotationCache : BaseCache<Annotation>
    {       
        #region Constructors

        /// <summary>
        /// Initializes AnnotationCache with the given strategy
        /// </summary>
        /// <param name="cachingStrategy">Used cachingStrategy</param>
        internal AnnotationCache(ICachingStrategy<Annotation> cachingStrategy)
            : base(cachingStrategy) 
        { }

        #endregion

        #region Overriden methods

        public override string GetKey(Annotation item)
        {
            return item.Id.HasValue ? item.Id.Value.ToString() : null;
        }

        #endregion
    }
}
